Adding a view that layouts with NotAutoLayout framework#8
Adding a view that layouts with NotAutoLayout framework#8lucdion merged 6 commits intolayoutBox:masterfrom
Conversation
|
Hi @el-hoshino, thanks for adding your framework! Could you try to update the layout to match the one from LayoutKit, which is the reference I use for all layouts, except those that was already existing (autolayout and UIStackView). See https://github.com/layoutBox/LayoutFrameworkBenchmark/blob/master/docs_markdown/benchmark_result_LayoutKit.png Required:
|
|
Hi @lucdion, thanks for your review. I'm updating my sample code now, and I found that only LayoutKit has an additional "2nd" label on the right side of poster name label, other samples like PinLayout and FlexLayout don't have this one. Should I implement this label on my sample? |
…ditional subviews that may slow down the layout process, but easier to understand the layout via code
|
Hi @lucdion I've updated my sample code to match the layout from LayoutKit (or actually it was kind of difficult to read LayoutKit's code... so some of the implementations are from FlexLayout and PinLayout, but anyway paddings and margins around views are added now, and poster image is also vertically centered with those poster labels now. Here's the screenshots on iPhone X and iPhone SE: Also here's a new log of all benchmarks: (I'm using another computer now so the results may be very different from the old log) seconds/ops for each iterations (10, 20, ..., 100)
-------------------------------------
Auto Layout 0.0486564749763125 0.0789526700973511 0.113672216733297 0.142112642526627 0.173426647981008 0.212768220901489 0.250551819801331 0.270187044143677 0.311900234222412 0.343671178817749
FlexLayout 1.3 0.0108966788519984 0.0163464430839785 0.0203984332084656 0.0251854687929153 0.02933030128479 0.0338239351908366 0.0380328717055144 0.0425496647755305 0.0458871126174927 0.0501276910305023
LayoutKit 7.0 0.0142315458244001 0.0199406147003174 0.0258124822225326 0.0318559110164642 0.0373490077477914 0.0433929612239202 0.0486717110588437 0.0542295167320653 0.0608607600716984 0.0660520270466805
Manual Layout 0.0154459531490619 0.022968668829311 0.0298784585560069 0.0368530665125166 0.0440848858460136 0.0519565165042877 0.0600972175598145 0.0670293887456258 0.0742364270346505 0.084293931722641
NotAutoLayout 0.0132579442701842 0.0180327019521168 0.0225512901941935 0.0270275755932457 0.0314559638500214 0.035545825958252 0.0409720802307129 0.0488930032366798 0.0492834761029198 0.0534357836371974
PinLayout 1.7 0.0135176584527299 0.0193697557999538 0.0256495108971229 0.0309170231674657 0.0364585646561214 0.0456861853599548 0.0481453396025158 0.0541553622797916 0.0601801942376529 0.0663456693291664
UIStackView 0.065653882920742 0.105512368679047 0.14726642199925 0.187819341818492 0.228378200531006 0.266939210891724 0.306461381912231 0.347361779212952 0.383745002746582 0.421917009353638
Completed! |
|
Last thing, could you update the README to include the reference to your framework. |
|
I've added the reference to my framework, please have a check 👍 |
|
@el-hoshino I've updated all charts, including NotAutoLayout |
|
@lucdion Thanks a lot 😆 |


Hi.
I made a framework called NotAutoLayout, which also uses pure code to layout subviews without Auto Layout constraints. Please have a check.
Layout result of NotAutoLayout:

Result comparison between Manual Layout and NotAutoLayout

Log of "Run all benchmarks" and "NotAutoLayout":